home *** CD-ROM | disk | FTP | other *** search
- 10 rem resistor color code
- 20 rem bob bader
- 30 rem new hampshire
- 40 rem 1984
- 100 poke53280,2:poke53281,0:print"[147]":printchr$(14)
- 110 print
- 120 printtab(9)"[144] [149] [129] [158] [156] [151] "
- 130 printtab(9)"[144] [149] [129] [158] [156] [151] "
- 140 poke646,7:print
- 150 print:printtab(10)"[210]esistor [195]olor [195]ode"
- 160 print:print:print:print
- 170 poke646,2
- 180 printtab(18)"by"
- 190 print:print:print
- 200 poke646,14
- 210 printtab(15)"[194]ob [194]ader"
- 220 print:print:print:print:print:print
- 230 poke646,3
- 240 printtab(4)"[196]o you need instructions ? ([217]/[206])"
- 250 poke198,0:wait198,1
- 260 geta$:ifa$="y"thengosub50000:goto270
- 265 ifa$<>"n"thengosub60000:goto250
- 270 print"[147]":print:poke646,3
- 280 input"1st [195]olor[158]";a$
- 281 iflen(a$)<3thengosub60010:goto280
- 285 poke646,3
- 290 print:input"2nd [195]olor[158]";b$
- 291 iflen(b$)<3thengosub60010:goto290
- 295 poke646,3
- 300 print:input"3rd [195]olor[158]";c$
- 301 iflen(c$)<3thengosub60010:goto300
- 302 a=0:b=0:c=0
- 400 ifa$="black"thena=0
- 410 ifa$="brown"thena=1
- 420 ifa$="red"thena=2
- 430 ifa$="orange"thena=3
- 440 ifa$="yellow"thena=4
- 450 ifa$="green"thena=5
- 460 ifa$="blue"thena=6
- 470 ifa$="violet"thena=7
- 480 ifa$="gray"thena=8
- 490 ifa$="white"thena=9
- 500 ifb$="black"thenb=0
- 510 ifb$="brown"thenb=1
- 520 ifb$="red"thenb=2
- 530 ifb$="orange"thenb=3
- 540 ifb$="yellow"thenb=4
- 550 ifb$="green"thenb=5
- 560 ifb$="blue"thenb=6
- 570 ifb$="violet"thenb=7
- 580 ifb$="gray"thenb=8
- 590 ifb$="white"thenb=9
- 600 ifc$="black"thenc=1
- 610 ifc$="brown"thenc = 10
- 620 ifc$="red"thenc = 100
- 630 ifc$="orange"thenc = 1000
- 640 ifc$="yellow"thenc = 10000
- 650 ifc$="green"thenc = 100000
- 660 ifc$="blue"thenc = 1000000
- 670 ifc$="violet"thenc = 10000000
- 680 ifc$="gray"thenc = 100000000
- 690 ifc$="white"thenc = 1000000000
- 691 ifa=0thenifa$<>"black"thengosub8000:goto240
- 692 ifb=0thenifb$<>"black"thengosub8000:goto240
- 693 ifc=0thengosub8000:goto240
- 700 z=((a*10)+b)*c
- 710 z$=str$(z)
- 720 iflen(z$)=2orlen(z$)=3orlen(z$)=4thengoto1000
- 730 iflen(z$)=5orlen(z$)=6orlen(z$)=7thengoto2000
- 740 iflen(z$)=7orlen(z$)=8orlen(z$)=9orlen(z$)=10thengoto3000
- 1000 print"[147]";:gosub5000
- 1010 poke646,10
- 1020 printtab(16)"[145][145][145]"z;"[207]hms"
- 1100 goto6000
- 2000 print"[147]";:gosub5000
- 2010 poke646,10
- 2020 printtab(14)"[145][145][145]"z/1000;"[203] [207]hms
- 2100 [137]6000
- 3000 [153]"load";:[141]5000
- 3010 [151]646,10
- 3020 [153][163]14)"ononon"z[173]10[174]6;"(NULL) (NULL)hms"
- 3100 [137]6000
- 5000 [153]:[153][163]9)"stop verify for sys clr poke "
- 5001 [153][163]9)"stop verify for sys clr poke "
- 5005 [153]:[153]:[153]:[153]:[153]:[153]:[153]
- 5010 [153][163]10)"********************"
- 5020 [153][163]10)"* *"
- 5030 [153][163]10)"* *"
- 5040 [153][163]10)"* *"
- 5060 [153][163]10)"********************"
- 5070 [142]
- 6000 [151]646,12
- 6010 [153]:[153]:[153]:[153]:[153]:[153]:[153]
- 6020 [153][163]3)"str$o you want to do another ? ((NULL)/(NULL))
- 6030 poke198,0:wait198,1
- 6040 geta$:ifa$="n"then7000
- 6050 ifa$<>"y"then6040
- 6060 goto270
- 7000 print"[147]":poke646,1:printchr$(142):goto63000
- 8000 print"[207]ne or more of the colors you entered"
- 8010 print:print"was not valid. [208]lease try again.":print:return
- 50000 print"[147]";:poke646,1
- 50010 print:print
- 50100 print"[212]his program will give you the
- 50105 [153]
- 50110 [153]"resistance of a resistor by inputting
- 50115 print
- 50120 print"the colors of the resistor.
- 50200 [153]:[153]:[153]
- 50250 [153]"(NULL)ake sure (NULL)(NULL)(NULL) to use clrlenatn(NULL)right$(NULL)atn(NULL) "
- 50255 [153]
- 50260 [153]"letters when inputting the colors"
- 50270 [153]:[153]"and remember to spell the colors out."
- 50300 [153]:[153]:[153]:[153]:[153]
- 50350 [153][163]10)"sys(NULL)ress len to continue"
- 50360 [151]198,0:[146]198,1
- 50370 [161]a$:[139]a$[178]"c"[167][137]51000
- 50380 [139]a$[179][177]"c"[167][141]60000:[137]50360
- 51000 [153]"load":[153]
- 51010 [153]"(NULL)he way right$ remember the color code"
- 51020 [153]:[153]"is with the mnemonic:"
- 51030 [153]:[153]"peekatnstr$","black",0:[153]"verifypeek(NULL)(NULL)(NULL)","brown",1
- 51040 [153]"(NULL)(NULL)(NULL)","red",2:[153]"for(NULL)(NULL)","orange",3:[153]"sys(NULL)(NULL)(NULL)(NULL)","yellow",4
- 51050 [153]"chr$(NULL)atn(NULL)(NULL)","green",5:[153]"peekvalasc(NULL)(NULL)val","blue",6
- 51055 [153]"clr(NULL)right$(NULL)(NULL)val(NULL)(NULL)(NULL)(NULL)","violet",7:[153]"pokechr$val(NULL)(NULL)right$(NULL)chr$","gray",8
- 51060 [153]"(NULL)left$right$(NULL)(NULL)valstr$","white",9
- 52000 [153]:[153]:[153]:[153]:[153]
- 52010 [153][163]10)"sys(NULL)ress len to continue"
- 52020 [151]198,0:[146]198,1
- 52030 [161]a$:[139]a$[178]"c"[167][142]
- 52040 [139]a$[179][177]"c"[167][141]60000:[137]52020
- 60000 [151]53280,[187](1)[172]15:[151]53280,2:[142]
- 60010 [153]"(NULL)ou must spell out the word.":[142]
- 63000 [143] connect back to l.s.
- 63002 [153]"loadload"[199](34)"payload"[199](34)",8":[153]"run"
- 63004 [151]198,0:[151]631,13:[151]632,13:[151]198,2:[128]
-